// ... 现有代码 ...

class ExampleViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 手动上报事件
        TraceManager.shared.track(event: "button_click", payload: ["button_name": "login_button"])
        
        // 定时更新运行时长显示
        Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(updateRunningTimeLabel), userInfo: nil, repeats: true)
    }
    
    @objc func updateRunningTimeLabel() {
        // 获取当前会话时长
        let currentSessionDuration = TraceManager.shared.getCurrentSessionDuration()
        
        // 获取总运行时长
        let totalRunningTime = TraceManager.shared.getTotalRunningTime()
        
        // 更新UI显示
        sessionDurationLabel.text = "本次使用: \(formatTimeInterval(currentSessionDuration))"
        totalRunningTimeLabel.text = "累计使用: \(formatTimeInterval(totalRunningTime))"
    }
    
    // 格式化时间间隔为可读形式 (HH:MM:SS)
    private func formatTimeInterval(_ interval: TimeInterval) -> String {
        let hours = Int(interval) / 3600
        let minutes = (Int(interval) % 3600) / 60
        let seconds = Int(interval) % 60
        
        return String(format: "%02d:%02d:%02d", hours, minutes, seconds)
    }
    
    // ... 其他现有代码 ...
}